CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

if (MSVC)
	include_directories(${THIRD_PARTY}/stdint)
endif()

include_directories(${COMN_DIR}/include)

include_directories(include)

include_directories(${UNIMEDIACORE_INCLUDE_DIR}/UniMediaCore/include)
include_directories(${UNIMEDIACORE_INCLUDE_DIR}/UniMediaMuxer/include)
include_directories(${UNIMEDIACORE_INCLUDE_DIR}/UniMediaWriter/include)
include_directories(${UNIMEDIACORE_INCLUDE_DIR}/UniMediaSource/include)
link_directories(${UNIMEDIACORE_LIBRARY_DIR})

link_directories(${COMN_DIR}/lib)
link_directories(${PROJECT_ROOT}/lib)

include_directories(${FFMPEG_DIR}/include)
link_directories(${FFMPEG_LIBRARY_DIR})

include_directories(${SQLITE3_INCLUDE})
link_directories(${SQLITE3_LIBRARY_DIR})

aux_source_directory(. SOURCES)
aux_source_directory(src SOURCES)

add_library(UniMediaStore SHARED ${SOURCES})


target_link_libraries(UniMediaStore
	debug comnd optimized comn
	UniMediaWriter
	UniMediaSource
	UniMediaMuxer
	UniMediaCore
	sqlite3
	${FFMPEG_LIBRARIES}
	${LIB_PLATFORM}
	)

set_target_properties(UniMediaStore PROPERTIES LINK_INTERFACE_LIBRARIES "")
set_target_properties(UniMediaStore PROPERTIES INTERFACE_LINK_LIBRARIES "")

install(TARGETS UniMediaStore DESTINATION lib)
